﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using OLTS.WEB.BaseClass;

namespace ONTS.WEB.Views
{
    public partial class TimeSheetOverview : BaseWebpage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
           
                if (!IsPostBack)
                {
                    if (Session["LOGIN"] != null)
                    {
                        getMonth();
                        ddlMonth.SelectedValue = DateTime.Now.Month.ToString();
                    }
                    else
                    {
                        Response.Redirect("/AccessDeniedPage.aspx");
                    }
                }
             
        }

        private void getMonth()
        {
            for (int i = 1; i < 13; i++)
            {
                ddlMonth.Items.Add(new ListItem(CultureInfo.CurrentCulture.DateTimeFormat.GetMonthName(i), i.ToString()));
            }
        }

        protected void btnExport_Excel_Click(object sender, EventArgs e)
        {
            Response.Redirect("ExportExcel.aspx?Action=Export&id=" + BaseService.LOGIN.EMPLOYEE_ID) ;
        }
    }
}